<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   template="/WEB-INF/templates/business/buyer/template.xhtml">

	<f:metadata>
		<f:viewParam name="bulletinId" value="#{bulletinHome3.id}"></f:viewParam>
		<f:event listener="#{bulletinHome3.initConversation()}" type="preRenderView"></f:event>
	</f:metadata>
	
	<ui:define name="buyer_content">
		<h:form>
			<p:messages id="messages" closable="true">
	       		<p:autoUpdate />
	       	</p:messages>
			<p:selectOneRadio id="supplierRadio" value="#{bulletinHome3.manualChooseTrade}" layout="custom" >
				<f:selectItems value="#{bulletinHome3.instance.verifiedTrades}" var="_trade" itemValue="#{_trade}"></f:selectItems>
				<f:converter converterId="entityConverter"></f:converter>
			</p:selectOneRadio>
			<div class="iethbox_table">
				<p:panel>
					<p:panelGrid>
						<c:forEach items="#{bulletinHome3.instance.verifiedTrades}" var="_trade" varStatus="_status">
							<p:row>
								<p:column>
									<p:radioButton for="supplierRadio" itemIndex="#{_status.index}">
									</p:radioButton>								
								</p:column>
							
								<p:column headerText="申请中介">
									<h:outputText value="#{_trade.supplier.cnname}" />
								</p:column>
								
								<p:column headerText="完成订单数">
									<h:outputText value="#{_trade.supplier.orderCount}" />
								</p:column>
								
								<p:column headerText="中介分值">
									<h:outputText value="#{_trade.supplier.score}" />
								</p:column>
							</p:row>
						</c:forEach>					
					</p:panelGrid>
				</p:panel>
				
				<div class="actionButtons">
					<p:commandButton value="选择" action="#{bulletinHome3.manualChoose()}"></p:commandButton>		
					<p:button value="取消" outcome="AuditSuccessBulletinList.xhtml"></p:button>		
				</div>
			</div>
		</h:form>
	</ui:define>
	
</ui:composition>